

#include "src/net/Timer.h"

using namespace sola;
using namespace sola::net;

// AtomicInt64 Timer::s_numCreated_;
std::atomic<int64_t> Timer::s_numCreated_(0);

void Timer::restart(Timestamp now) {
    if (repeat_) {
        expiration_ = addTime(now, interval_);
    } else {
        expiration_ = Timestamp::invalid();
    }
}
